package app

import (
	"github.com/gin-gonic/gin"
	"yxs-mall/app/mall/router"
)

var AppRouters = make([]func(engine *gin.Engine), 0)

func init() {
	//注册路由 fixme 其他应用的路由，在本目录新建文件放在init方法
	AppRouters = append(AppRouters, router.InitRouter)
}

func InitRouter(g *gin.Engine) {
	for _, f := range AppRouters {
		f(g)
	}
}
